package Nitrus;

public class Autenticacion {
    private boolean status;
    private int counter;
    public Autenticacion() {
            super();
            this.status = false;
            this.counter = 3;
    }
    public boolean isStatus() {
            return status;
    }
    private void setStatus(boolean status) {
            this.status = status;
    }
    public int getCounter() {
            return counter;
    }
    private void setCounter(int counter) {
            this.counter = counter;
    }
    public void login(String usuario, String contraseña) throws Exception{
            GestorAutenticacion g = new GestorAutenticacion();
            if(counter>0) { status=g.comprobar(usuario, contraseña); }
    }
    public void logout(){
            this.setStatus(false);
            this.setCounter(3);
    }
}